home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Applications / OutOfPhase 1.02 / OutOfPhase 1.02 Source / OutOfPhase Folder / AboutBox.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-08-21  |  50.4 KB  |  655 lines  |  [TEXT/KAHL]

  1. /* AboutBox.c */
  2. /*****************************************************************************/
  3. /*                                                                           */
  4. /*    Out Of Phase:  Digital Music Synthesis on General Purpose Computers    */
  5. /*    Copyright (C) 1994  Thomas R. Lawrence                                 */
  6. /*                                                                           */
  7. /*    This program is free software; you can redistribute it and/or modify   */
  8. /*    it under the terms of the GNU General Public License as published by   */
  9. /*    the Free Software Foundation; either version 2 of the License, or      */
  10. /*    (at your option) any later version.                                    */
  11. /*                                                                           */
  12. /*    This program is distributed in the hope that it will be useful,        */
  13. /*    but WITHOUT ANY WARRANTY; without even the implied warranty of         */
  14. /*    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          */
  15. /*    GNU General Public License for more details.                           */
  16. /*                                                                           */
  17. /*    You should have received a copy of the GNU General Public License      */
  18. /*    along with this program; if not, write to the Free Software            */
  19. /*    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.              */
  20. /*                                                                           */
  21. /*    Thomas R. Lawrence can be reached at tomlaw@world.std.com.             */
  22. /*                                                                           */
  23. /*****************************************************************************/
  24.  
  25. #include "MiscInfo.h"
  26. #include "Debug.h"
  27. #include "Audit.h"
  28. #include "Definitions.h"
  29.  
  30. #include "AboutBox.h"
  31. #include "TextEdit.h"
  32. #include "WindowDispatcher.h"
  33. #include "Memory.h"
  34. #include "DataMunging.h"
  35. #include "Main.h"
  36.  
  37.  
  38. #define WIDTH (480)
  39. #define HEIGHT (300)
  40.  
  41. #define IPWidth (304)
  42. #define IPHeight (54)
  43. #define IPX ((WIDTH - IPWidth) / 2)
  44. #define IPY (12)
  45.  
  46. #define PresentsY (IPY + IPHeight + 2)
  47.  
  48. #define StupidWidth (272)
  49. #define StupidHeight (37)
  50. #define StupidX ((WIDTH - StupidWidth) / 2)
  51. #define StupidY (PresentsY + 32)
  52.  
  53. #define IconWidth (32)
  54. #define IconHeight (32)
  55. #define IconX (WIDTH - IconWidth - 12)
  56. #define IconY (12)
  57.  
  58. #define EditX (-1)
  59. #define EditY (StupidY + StupidHeight + 10)
  60. #define EditWidth (WIDTH + 2)
  61. #define EditHeight (HEIGHT - EditY - 20)
  62.  
  63.  
  64. struct AboutBoxWindowRec
  65.     {
  66.         WinType*                        ScreenID;
  67.         TextEditRec*                Information;
  68.         GenericWindowRec*        MyGenericWindow; /* how the window event dispatcher knows us */
  69.     };
  70.  
  71.  
  72. /* prototypes */
  73. static void        AboutBoxWindowDoIdle(AboutBoxWindowRec* Window,
  74.                                 MyBoolean CheckCursorFlag, OrdType XLoc, OrdType YLoc,
  75.                                 ModifierFlags Modifiers);
  76. static void        AboutBoxWindowBecomeActive(AboutBoxWindowRec* Window);
  77. static void        AboutBoxWindowBecomeInactive(AboutBoxWindowRec* Window);
  78. static void        AboutBoxWindowJustResized(AboutBoxWindowRec* Window);
  79. static void        AboutBoxWindowDoMouseDown(OrdType XLoc, OrdType YLoc,
  80.                                 ModifierFlags Modifiers, AboutBoxWindowRec* Window);
  81. static void        AboutBoxWindowDoKeyDown(unsigned char KeyCode,
  82.                                 ModifierFlags Modifiers, AboutBoxWindowRec* Window);
  83. static void        AboutBoxWindowClose(AboutBoxWindowRec* Window);
  84. static void        AboutBoxWindowUpdator(AboutBoxWindowRec* Window);
  85. static void        AboutBoxWindowMenuSetup(AboutBoxWindowRec* Window);
  86. static void        AboutBoxWindowDoMenuCommand(AboutBoxWindowRec* Window,
  87.                                 MenuItemType* MenuItem);
  88.  
  89.  
  90. static unsigned char            IntegralProductionsdx[] =
  91.     {
  92.         0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  93.         0x00,0x00,0x00,0x00,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  94.         0x00,0x00,0x00,0x00,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  95.         0x00,0x00,0xF8,0x00,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  96.         0x00,0x03,0xFE,0x00,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  97.         0x00,0x07,0x7E,0x00,0x30,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  98.         0x00,0x06,0x3E,0x00,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  99.         0x00,0x0C,0x1E,0x00,0x3F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  100.         0x00,0x0C,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  101.         0x00,0x1C,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  102.         0x00,0x1C,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  103.         0x00,0x1C,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  104.         0x00,0x1C,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  105.         0x00,0x3C,0x00,0x00,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  106.         0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  107.         0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  108.         0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  109.         0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  110.         0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  111.         0x00,0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,
  112.         0x00,0x38,0x00,0x00,0x00,0x00,0x1F,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x80,0x0F,0xFC,0x00,0x00,0x00,0x03,0xC0,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x00,0x00,
  113.         0x00,0x38,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x03,0x07,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,
  114.         0x00,0x38,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x03,0x03,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,
  115.         0x00,0x38,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x03,0x01,0x80,0x00,0x00,0x00,0xC0,0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,
  116.         0x00,0x38,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x01,0x80,0x03,0x01,0x80,0x00,0x00,0x00,0xC0,0x00,0x00,0x03,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,
  117.         0x00,0x38,0x00,0x00,0x00,0x00,0x06,0x06,0x78,0xFE,0x1E,0x01,0xF0,0x33,0x8F,0x81,0x80,0x03,0x01,0x99,0xC3,0xE0,0x1E,0xCF,0x1E,0x03,0xC7,0xF3,0x01,0xF0,0x33,0xC1,0xE8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  118.         0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  119.         0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  120.         0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  121.         0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  122.         0x00,0x00,0x01,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  123.         0x00,0x00,0x07,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
  124.     };
  125.  
  126. static unsigned char            NameOfProgram[] =
  127.     {
  128.         0x00,0x0F,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xF8,0x00,0x00,0x1F,0xC0,0x00,0x00,0x00,0x00,0x03,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  129.         0x00,0x7F,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3F,0xFE,0x00,0x00,0x7F,0xE0,0x00,0x7F,0xFF,0x80,0x7F,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  130.         0x01,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,0xFF,0xFF,0x80,0x01,0xFF,0xF0,0x00,0xFF,0xFF,0xF0,0x7F,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  131.         0x03,0xF8,0x3F,0x80,0x00,0x00,0x00,0x00,0x7C,0x00,0x00,0x01,0xFC,0x1F,0xC0,0x03,0xFF,0xF0,0x00,0xFF,0xFF,0xF8,0x7F,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  132.         0x07,0xE0,0x1F,0xC0,0x00,0x00,0x00,0x00,0x7C,0x00,0x00,0x03,0xF0,0x0F,0xE0,0x03,0xF1,0xF0,0x00,0x3F,0xC3,0xF8,0x1F,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  133.         0x0F,0xC0,0x0F,0xC0,0x00,0x00,0x00,0x00,0xFC,0x00,0x00,0x07,0xE0,0x07,0xE0,0x07,0xF0,0xE0,0x00,0x3F,0xC1,0xFC,0x1F,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  134.         0x1F,0xC0,0x0F,0xE0,0x00,0x00,0x00,0x01,0xF8,0x00,0x00,0x0F,0xE0,0x07,0xF0,0x07,0xE0,0x00,0x00,0x3F,0x81,0xFC,0x1F,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  135.         0x3F,0x80,0x07,0xE0,0x00,0x00,0x00,0x03,0xF8,0x00,0x00,0x1F,0xC0,0x03,0xF0,0x0F,0xE0,0x00,0x00,0x3F,0x81,0xFC,0x1F,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  136.         0x3F,0x80,0x07,0xF0,0x1F,0x83,0xF8,0x0F,0xFF,0xC0,0x00,0x1F,0xC0,0x03,0xF8,0x7F,0xFC,0x00,0x00,0x3F,0x81,0xFC,0x1F,0xC7,0xE0,0x00,0x3F,0x9F,0xC0,0x07,0xF8,0x00,0x07,0xF0,
  137.         0x7F,0x00,0x07,0xF3,0xFF,0x83,0xF8,0x1F,0xFF,0xC0,0x00,0x3F,0x80,0x03,0xF8,0xFF,0xFC,0x00,0x00,0x3F,0x81,0xFC,0x1F,0xDF,0xF8,0x00,0xFF,0xFF,0xC0,0x1F,0xFE,0x00,0x3F,0xFC,
  138.         0x7F,0x00,0x07,0xF3,0xFF,0x87,0xF8,0x1F,0xFF,0xC0,0x00,0x3F,0x80,0x03,0xF8,0xFF,0xF8,0x00,0x00,0x3F,0x81,0xFC,0x3F,0xFF,0xF8,0x01,0xFF,0xFF,0xC0,0x7F,0xFF,0x80,0xFF,0xFE,
  139.         0x7F,0x00,0x07,0xF3,0xFF,0x07,0xF0,0x07,0xF0,0x00,0x00,0x3F,0x80,0x03,0xF8,0x1F,0xE0,0x00,0x00,0x7F,0x83,0xF8,0x3F,0xFF,0xFC,0x07,0xF8,0x7F,0x80,0xFE,0x3F,0x81,0xFC,0x7F,
  140.         0xFE,0x00,0x07,0xF0,0xFF,0x07,0xF0,0x07,0xF0,0x00,0x00,0x7F,0x00,0x03,0xF8,0x1F,0xC0,0x00,0x00,0x7F,0x07,0xF8,0x3F,0xE3,0xFC,0x07,0xF0,0x3F,0x80,0xFC,0x1F,0x83,0xF8,0x3F,
  141.         0xFE,0x00,0x07,0xF0,0x7F,0x07,0xF0,0x07,0xF0,0x00,0x00,0x7F,0x00,0x03,0xF8,0x1F,0xC0,0x00,0x00,0x7F,0x0F,0xF0,0x3F,0x81,0xFC,0x0F,0xE0,0x3F,0x81,0xFC,0x07,0x07,0xF0,0x3F,
  142.         0xFE,0x00,0x07,0xF0,0x7F,0x07,0xF0,0x07,0xF0,0x00,0x00,0x7F,0x00,0x03,0xF8,0x1F,0xC0,0x00,0x00,0x7F,0xFF,0xE0,0x3F,0x81,0xFC,0x1F,0xC0,0x3F,0x81,0xFE,0x00,0x07,0xF0,0x3F,
  143.         0xFE,0x00,0x07,0xF0,0xFF,0x0F,0xF0,0x07,0xF0,0x00,0x00,0x7F,0x00,0x03,0xF8,0x1F,0xC0,0x00,0x00,0x7F,0xFF,0xC0,0x7F,0x81,0xFC,0x1F,0xC0,0x3F,0x81,0xFF,0xC0,0x0F,0xE0,0x7E,
  144.         0xFE,0x00,0x0F,0xE0,0xFE,0x0F,0xE0,0x0F,0xE0,0x00,0x00,0x7F,0x00,0x07,0xF0,0x1F,0xC0,0x00,0x00,0x7F,0xFF,0x00,0x7F,0x01,0xF8,0x3F,0x80,0x7F,0x01,0xFF,0xF8,0x0F,0xE3,0xFE,
  145.         0xFE,0x00,0x0F,0xE0,0xFE,0x0F,0xE0,0x0F,0xE0,0x00,0x00,0x7F,0x00,0x07,0xF0,0x1F,0xC0,0x00,0x00,0xFF,0x00,0x00,0x7F,0x03,0xF8,0x3F,0x80,0x7F,0x00,0xFF,0xFC,0x1F,0xFF,0xFC,
  146.         0xFE,0x00,0x0F,0xE0,0xFE,0x0F,0xE0,0x0F,0xE0,0x00,0x00,0x7F,0x00,0x07,0xF0,0x3F,0xC0,0x00,0x00,0xFE,0x00,0x00,0x7F,0x03,0xF8,0x3F,0x80,0x7F,0x00,0x7F,0xFE,0x1F,0xFF,0xE0,
  147.         0xFE,0x00,0x1F,0xC0,0xFE,0x0F,0xE0,0x0F,0xE0,0x00,0x00,0x7F,0x00,0x0F,0xE0,0x3F,0x80,0x00,0x00,0xFE,0x00,0x00,0x7F,0x03,0xF8,0x3F,0x80,0x7F,0x00,0x0F,0xFF,0x1F,0xFF,0x00,
  148.         0x7E,0x00,0x1F,0xC1,0xFC,0x1F,0xE0,0x0F,0xE0,0x00,0x00,0x3F,0x00,0x0F,0xE0,0x3F,0x80,0x00,0x00,0xFE,0x00,0x00,0xFF,0x03,0xF0,0x3F,0x80,0xFF,0x00,0x01,0xFF,0x1F,0xC0,0x00,
  149.         0x7F,0x00,0x3F,0x81,0xFC,0x1F,0xC0,0x1F,0xC0,0x00,0x00,0x3F,0x80,0x1F,0xC0,0x3F,0x80,0x00,0x00,0xFE,0x00,0x00,0xFE,0x07,0xF0,0x3F,0x80,0xFF,0x03,0x80,0xFF,0x1F,0xC0,0x00,
  150.         0x3F,0x00,0x3F,0x01,0xFC,0x1F,0xC0,0x1F,0xC3,0x00,0x00,0x1F,0x80,0x1F,0x80,0x3F,0x80,0x00,0x00,0xFE,0x00,0x00,0xFE,0x07,0xF0,0x3F,0x81,0xFF,0x07,0xE0,0x7F,0x1F,0xC0,0x0C,
  151.         0x3F,0x80,0x7E,0x01,0xFC,0x7F,0xE4,0x1F,0xC7,0x00,0x00,0x1F,0xC0,0x3F,0x00,0x3F,0x80,0x00,0x01,0xFE,0x00,0x00,0xFE,0x07,0xF1,0x1F,0xC3,0xFF,0x17,0xE0,0x7E,0x0F,0xF0,0x7E,
  152.         0x1F,0xC1,0xFC,0x01,0xFF,0xFF,0xFC,0x1F,0xFF,0x80,0x00,0x0F,0xE0,0xFE,0x00,0x3F,0x80,0x00,0x03,0xFE,0x00,0x00,0xFE,0x07,0xFF,0x9F,0xFF,0xFF,0xFF,0xF8,0xFE,0x0F,0xFF,0xFC,
  153.         0x0F,0xFF,0xF8,0x00,0xFF,0xFF,0xFE,0x1F,0xFF,0x00,0x00,0x07,0xFF,0xFC,0x00,0x7F,0x00,0x00,0x0F,0xFF,0x80,0x01,0xFE,0x07,0xFF,0x8F,0xFE,0xFF,0xFB,0xFF,0xFC,0x07,0xFF,0xF8,
  154.         0x03,0xFF,0xE0,0x00,0xFF,0x9F,0xF8,0x0F,0xFC,0x00,0x00,0x01,0xFF,0xF0,0x00,0x7F,0x00,0x00,0x0F,0xFF,0x80,0x01,0xFC,0x03,0xFF,0x07,0xFC,0x7F,0xE1,0xFF,0xF0,0x03,0xFF,0xE0,
  155.         0x00,0xFF,0x00,0x00,0x3E,0x07,0xE0,0x03,0xE0,0x00,0x00,0x00,0x7F,0x80,0x00,0x7F,0x00,0x00,0x0F,0xFF,0x80,0x01,0xFC,0x00,0xF8,0x03,0xF0,0x3F,0x00,0x7F,0xC0,0x00,0x7F,0x00,
  156.         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  157.         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  158.         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFC,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  159.         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0x81,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  160.         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xE3,0xF0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  161.         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xFF,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  162.         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0xFF,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  163.         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x07,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
  164.         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00
  165.     };
  166.  
  167. static unsigned char            Icon[] =
  168.     {
  169.         0x00,0x01,0x00,0x00, 0x00,0x02,0x80,0x00, 0x00,0x04,0x40,0x00, 0x00,0x08,0x20,0x00,
  170.         0x00,0x10,0x10,0x00, 0x00,0x20,0x08,0x00, 0x00,0x40,0x04,0x00, 0x00,0x84,0x02,0x00,
  171.         0xFF,0xF5,0xFF,0xFF, 0x02,0x04,0x00,0x80, 0x04,0x04,0x00,0x40, 0xFF,0xF5,0xFF,0xFF,
  172.         0x10,0x04,0x00,0x10, 0x20,0x04,0x00,0x08, 0xFF,0xF5,0xBF,0x3F, 0x80,0x04,0x40,0x82,
  173.         0x40,0x04,0x80,0x41, 0xFF,0x9D,0x30,0x2F, 0x10,0x3D,0xC8,0x14, 0x08,0x3E,0x7F,0x8F,
  174.         0xFF,0xBA,0x30,0x07, 0x02,0x01,0x00,0x07, 0x01,0x00,0x80,0x07, 0x00,0x80,0x60,0x07,
  175.         0x00,0x40,0x1F,0xE7, 0x00,0x20,0x02,0x1F, 0x00,0x10,0x04,0x07, 0x00,0x08,0x08,0x00,
  176.         0x00,0x04,0x10,0x00, 0x00,0x02,0x20,0x00, 0x00,0x01,0x40,0x00, 0x00,0x00,0x80,0x00
  177.     };
  178.  
  179. static char*                                Message[] =
  180.     {
  181.         "Written by Thomas R. Lawrence (tomlaw@world.std.com), Copyright (C) 1994.\x0d"
  182.         "This program is distributed under version 2 of the GNU General Public\x0d"
  183.         "License.  It may be freely redistributed under certain conditions.  There\x0d"
  184.         "is ABSOLUTELY NO WARRANTY.  Please read the License Agreement below.\x0d"
  185.         "\x0d"
  186.         "\x0d"
  187.     ,
  188.         "Special thanks to the following people:\x0d"
  189.         "\x0d"
  190.         "  Craig Peeper showed me all kinds of awful file formats and described\x0d"
  191.         "    how many of the programs for MS-DOS/Windows worked.  He also showed me\x0d"
  192.         "    how the Gravis UltraSound worked and gave me an efficient interpolation\x0d"
  193.         "    formula.\x0d"
  194.         "\x0d"
  195.         "  Eric Oehler helped design the synthesizer and provided insight into\x0d"
  196.         "    synthesis algorithms and systems used by the 'pros'.\x0d"
  197.         "\x0d"
  198.         "  William Annis supplied information about synthesis mechanisms and\x0d"
  199.         "    psychoacoustics.\x0d"
  200.         "\x0d"
  201.         "\x0d"
  202.     ,
  203.         "                    GNU GENERAL PUBLIC LICENSE\x0d"
  204.         "                       Version 2, June 1991\x0d"
  205.         "\x0d"
  206.     ,
  207.         " Copyright (C) 1989, 1991 Free Software Foundation, Inc.\x0d"
  208.         "                          675 Mass Ave, Cambridge, MA 02139, USA\x0d"
  209.         " Everyone is permitted to copy and distribute verbatim copies\x0d"
  210.         " of this license document, but changing it is not allowed.\x0d"
  211.         "\x0d"
  212.     ,
  213.         "                            Preamble\x0d"
  214.         "\x0d"
  215.         "  The licenses for most software are designed to take away your\x0d"
  216.         "freedom to share and change it.  By contrast, the GNU General Public\x0d"
  217.         "License is intended to guarantee your freedom to share and change free\x0d"
  218.         "software--to make sure the software is free for all its users.  This\x0d"
  219.         "General Public License applies to most of the Free Software\x0d"
  220.         "Foundation's software and to any other program whose authors commit to\x0d"
  221.         "using it.  (Some other Free Software Foundation software is covered by\x0d"
  222.         "the GNU Library General Public License instead.)  You can apply it to\x0d"
  223.         "your programs, too.\x0d"
  224.         "\x0d"
  225.     ,
  226.         "  When we speak of free software, we are referring to freedom, not\x0d"
  227.         "price.  Our General Public Licenses are designed to make sure that you\x0d"
  228.         "have the freedom to distribute copies of free software (and charge for\x0d"
  229.         "this service if you wish), that you receive source code or can get it\x0d"
  230.         "if you want it, that you can change the software or use pieces of it\x0d"
  231.         "in new free programs; and that you know you can do these things.\x0d"
  232.         "\x0d"
  233.     ,
  234.         "  To protect your rights, we need to make restrictions that forbid\x0d"
  235.         "anyone to deny you these rights or to ask you to surrender the rights.\x0d"
  236.         "These restrictions translate to certain responsibilities for you if you\x0d"
  237.         "distribute copies of the software, or if you modify it.\x0d"
  238.         "\x0d"
  239.     ,
  240.         "  For example, if you distribute copies of such a program, whether\x0d"
  241.         "gratis or for a fee, you must give the recipients all the rights that\x0d"
  242.         "you have.  You must make sure that they, too, receive or can get the\x0d"
  243.         "source code.  And you must show them these terms so they know their\x0d"
  244.         "rights.\x0d"
  245.         "\x0d"
  246.     ,
  247.         "  We protect your rights with two steps: (1) copyright the software, and\x0d"
  248.         "(2) offer you this license which gives you legal permission to copy,\x0d"
  249.         "distribute and/or modify the software.\x0d"
  250.         "\x0d"
  251.     ,
  252.         "  Also, for each author's protection and ours, we want to make certain\x0d"
  253.         "that everyone understands that there is no warranty for this free\x0d"
  254.         "software.  If the software is modified by someone else and passed on, we\x0d"
  255.         "want its recipients to know that what they have is not the original, so\x0d"
  256.         "that any problems introduced by othequirements apply to the modified work as a whole.  If\x0d"
  257.         "identifiable sections of that work are not derived from the Program,\x0d"
  258.         "and can be reasonably considered independent and separate works in\x0d"
  259.         "themselves, then this License, and its terms, do not apply to those\x0d"
  260.         "sections when you distribute them as separate works.  But when you\x0d"
  261.         "distribute the same sections as part of a whole which is a work based\x0d"
  262.         "on the Program, the distribution of the whole must be on the terms of\x0d"
  263.         "this License, whose permissions for other licensees extend to the\x0d"
  264.         "entire whole, and thus to each and every part regardless of who wrote it.\x0d"
  265.         "\x0d"
  266.     ,
  267.         "Thus, it is not the intent of this section to claim rights or contest\x0d"
  268.         "your rights to work written entirely by you; rather, the intent is to\x0d"
  269.         "exercise the right to control the distribution of derivative or\x0d"
  270.         "collective works based on the Program.\x0d"
  271.         "\x0d"
  272.     ,
  273.         "In addition, mere aggregation of another work not based on the Program\x0d"
  274.         "with the Program (or with a work based on the Program) on a volume of\x0d"
  275.         "a storage or distribution medium does not bring the other work under\x0d"
  276.         "the scope of this License.\x0d"
  277.         "\x0d"
  278.     ,
  279.         "  3. You may copy and distribute the Program (or a work based on it,\x0d"
  280.         "under Section 2) in object code or executable form under the terms of\x0d"
  281.         "Sections 1 and 2 above provided that you also do one of the following:\x0d"
  282.         "\x0d"
  283.     ,
  284.         "    a) Accompany it with the complete corresponding machine-readable\x0d"
  285.         "    source code, which must be distributed under the terms of Sections\x0d"
  286.         "    1 and 2 above on a medium customarily used for software interchange; or,\x0d"
  287.         "\x0d"
  288.     ,
  289.         "    b) Accompany it with a written offer, valid for at least three\x0d"
  290.         "    years, to give any third party, for a charge no more than your\x0d"
  291.         "    cost of physically performing source distribution, a complete\x0d"
  292.         "    machine-readable copy of the corresponding source code, to be\x0d"
  293.         "    distributed under the terms of Sections 1 and 2 above on a medium\x0d"
  294.         "    customarily used for software interchange; or,\x0d"
  295.         "\x0d"
  296.     ,
  297.         "    c) Accompany it with the information you received as to the offer\x0d"
  298.         "    to distribute corresponding source code.  (This alternative is\x0d"
  299.         "    allowed only for noncommercial distribution and only if you\x0d"
  300.         "    received the program in object code or executable form with such\x0d"
  301.         "    an offer, in accord with Subsection b above.)\x0d"
  302.         "\x0d"
  303.     ,
  304.         "The source code for a work means the preferred form of the work for\x0d"
  305.         "making modifications to it.  For an executable work, complete source\x0d"
  306.         "code means all the source code for all modules it contains, plus any\x0d"
  307.         "associated interface definition files, plus the scripts used to\x0d"
  308.         "control compilation and installation of the executable.  However, as a\x0d"
  309.         "special exception, the source code distributed need not include\x0d"
  310.         "anything that is normally distributed (in either source or binary\x0d"
  311.         "form) with the major components (compiler, kernel, and so on) of the\x0d"
  312.         "operating system on which the executable runs, unless that component\x0d"
  313.         "itself accompanies the executable.\x0d"
  314.         "\x0d"
  315.     ,
  316.         "If distribution of executable or object code is made by offering\x0d"
  317.         "access to copy from a designated place, then offering equivalent\x0d"
  318.         "access to copy the source code from the same place counts as\x0d"
  319.         "distribution of the source code, even though third parties are not\x0d"
  320.         "compelled to copy the source along with the object code.\x0d"
  321.         "\x0d"
  322.     ,
  323.         "  4. You may not copy, modify, sublicense, or distribute the Program\x0d"
  324.         "except as expressly provided under this License.  Any attempt\x0d"
  325.         "otherwise to copy, modify, sublicense or distribute the Program is\x0d"
  326.         "void, and will automatically terminate your rights under this License.\x0d"
  327.         "However, parties who have received copies, or rights, from you under\x0d"
  328.         "this License will not have their licensec., 675 Mass Ave, Cambridge, MA 02139, USA.\x0d"
  329.         "\x0d"
  330.     ,
  331.         "Also add information on how to contact you by electronic and paper mail.\x0d"
  332.         "\x0d"
  333.         "If the program is interactive, make it output a short notice like this\x0d"
  334.         "when it starts in an interactive mode:\x0d"
  335.         "\x0d"
  336.     ,
  337.         "    Gnomovision version 69, Copyright (C) 19yy name of author\x0d"
  338.         "    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.\x0d"
  339.         "    This is free software, and you are welcome to redistribute it\x0d"
  340.         "    under certain conditions; type `show c' for details.\x0d"
  341.         "\x0d"
  342.     ,
  343.         "The hypothetical commands `show w' and `show c' should show the appropriate\x0d"
  344.         "parts of the General Public License.  Of course, the commands you use may\x0d"
  345.         "be called something other than `show w' and `show c'; they could even be\x0d"
  346.         "mouse-clicks or menu items--whatever suits your program.\x0d"
  347.         "\x0d"
  348.     ,
  349.         "You should also get your employer (if you work as a programmer) or your\x0d"
  350.         "school, if any, to sign a \"copyright disclaimer\" for the program, if\x0d"
  351.         "necessary.  Here is a sample; alter the names:\x0d"
  352.         "\x0d"
  353.     ,
  354.         "  Yoyodyne, Inc., hereby disclaims all copyright interest in the program\x0d"
  355.         "  `Gnomovision' (which makes passes at compilers) written by James Hacker.\x0d"
  356.         "\x0d"
  357.     ,
  358.         "  <signature of Ty Coon>, 1 April 1989\x0d"
  359.         "  Ty Coon, President of Vice\x0d"
  360.         "\x0d"
  361.     ,
  362.         "This General Public License does not permit incorporating your program into\x0d"
  363.         "proprietary programs.  If your program is a subroutine library, you may\x0d"
  364.         "consider it more useful to permit linking proprietary applications with the\x0d"
  365.         "library.  If this is what you want to do, use the GNU Library General\x0d"
  366.         "Public License instead of this License.\x0d"
  367.     };
  368. #define MESSAGELENGTH (sizeof(Message) / sizeof(Message[0]))
  369.  
  370.  
  371. static AboutBoxWindowRec*        CurrentAboutBox = NIL;
  372.  
  373.  
  374. /* return a non-null terminated heap allocated block */
  375. static char*    GetTheMessage(void)
  376.     {
  377.         char*                Accumulator;
  378.         long                Scan;
  379.  
  380.         Accumulator = AllocPtrCanFail(0,"GetTheMessage");
  381.         if (Accumulator == NIL)
  382.             {
  383.              FailurePoint1:
  384.                 return NIL;
  385.             }
  386.         for (Scan = 0; Scan < MESSAGELENGTH; Scan += 1)
  387.             {
  388.                 char*                String;
  389.                 char*                Meow;
  390.  
  391.                 String = StringToBlockCopy(Message[Scan]);
  392.                 if (String == NIL)
  393.                     {
  394.                      FailurePoint2:
  395.                         ReleasePtr(Accumulator);
  396.                         goto FailurePoint1;
  397.                     }
  398.                 Meow = ConcatBlockCopy(Accumulator,String);
  399.                 ReleasePtr(String);
  400.                 if (Meow == NIL)
  401.                     {
  402.                         goto FailurePoint2;
  403.                     }
  404.                 ReleasePtr(Accumulator);
  405.                 Accumulator = Meow;
  406.             }
  407.         return Accumulator;
  408.     }
  409.  
  410.  
  411. /* show the about box.  this creates a new box if there isn't one, or raises the */
  412. /* window to the top if there already is one. */
  413. void                    ShowAboutBox(void)
  414.     {
  415.         if (CurrentAboutBox != NIL)
  416.             {
  417.                 ActivateThisWindow(CurrentAboutBox->ScreenID);
  418.             }
  419.          else
  420.             {
  421.                 char*                        Data;
  422.  
  423.                 CurrentAboutBox = (AboutBoxWindowRec*)AllocPtrCanFail(
  424.                     sizeof(AboutBoxWindowRec),"AboutBoxWindowRec");
  425.                 if (CurrentAboutBox == NIL)
  426.                     {
  427.                      FailurePoint1:
  428.                         return;
  429.                     }
  430.                 CurrentAboutBox->ScreenID = MakeNewWindow(eDocumentWindow,eWindowClosable,
  431.                     eWindowNotZoomable,eWindowNotResizable,DialogLeftEdge(WIDTH),
  432.                     DialogTopEdge(HEIGHT),WIDTH,HEIGHT,
  433.                     (void (*)(void*))&AboutBoxWindowUpdator,CurrentAboutBox);
  434.                 if (CurrentAboutBox->ScreenID == 0)
  435.                     {
  436.                      FailurePoint2:
  437.                         ReleasePtr((char*)CurrentAboutBox);
  438.                         CurrentAboutBox = NIL;
  439.                         goto FailurePoint1;
  440.                     }
  441.                 CurrentAboutBox->Information = NewTextEdit(CurrentAboutBox->ScreenID,
  442.                     eTEVScrollBar,GetMonospacedFont(),9,EditX,EditY,EditWidth,EditHeight);
  443.                 if (CurrentAboutBox->Information == NIL)
  444.                     {
  445.                      FailurePoint3:
  446.                         KillWindow(CurrentAboutBox->ScreenID);
  447.                         goto FailurePoint2;
  448.                     }
  449.                 Data = GetTheMessage();
  450.                 if (Data == NIL)
  451.                     {
  452.                      FailurePoint4:
  453.                         DisposeTextEdit(CurrentAboutBox->Information);
  454.                         goto FailurePoint3;
  455.                     }
  456.                 TextEditNewRawData(CurrentAboutBox->Information,Data,"\x0d");
  457.                 ReleasePtr(Data);
  458.                 /* notify window management */
  459.                 CurrentAboutBox->MyGenericWindow
  460.                     = CheckInNewWindow(CurrentAboutBox->ScreenID,CurrentAboutBox,
  461.                     (void (*)(void*,MyBoolean,OrdType,OrdType,ModifierFlags))&AboutBoxWindowDoIdle,
  462.                     (void (*)(void*))&AboutBoxWindowBecomeActive,
  463.                     (void (*)(void*))&AboutBoxWindowBecomeInactive,
  464.                     (void (*)(void*))&AboutBoxWindowJustResized,
  465.                     (void (*)(OrdType,OrdType,ModifierFlags,void*))&AboutBoxWindowDoMouseDown,
  466.                     (void (*)(unsigned char,ModifierFlags,void*))&AboutBoxWindowDoKeyDown,
  467.                     (void (*)(void*))&AboutBoxWindowClose,
  468.                     (void (*)(void*))&AboutBoxWindowMenuSetup,
  469.                     (void (*)(void*,MenuItemType*))&AboutBoxWindowDoMenuCommand);
  470.                 if (CurrentAboutBox->MyGenericWindow == NIL)
  471.                     {
  472.                      FailurePoint5:
  473.                         goto FailurePoint4;
  474.                     }
  475.                 SetWindowName(CurrentAboutBox->ScreenID,"About Out Of Phase...");
  476.                 AboutBoxWindowUpdator(CurrentAboutBox);
  477.             }
  478.     }
  479.  
  480.  
  481. /* close the about box.  does nothing if no about box is open */
  482. void                    HideAnyAboutBoxes(void)
  483.     {
  484.         if (CurrentAboutBox != NIL)
  485.             {
  486.                 CheckPtrExistence(CurrentAboutBox);
  487.                 CheckOutDyingWindow(CurrentAboutBox->MyGenericWindow);
  488.                 DisposeTextEdit(CurrentAboutBox->Information);
  489.                 KillWindow(CurrentAboutBox->ScreenID);
  490.                 ReleasePtr((char*)CurrentAboutBox);
  491.                 CurrentAboutBox = NIL;
  492.             }
  493.     }
  494.  
  495.  
  496. static void        AboutBoxWindowDoIdle(AboutBoxWindowRec* Window,
  497.                                 MyBoolean CheckCursorFlag, OrdType XLoc, OrdType YLoc,
  498.                                 ModifierFlags Modifiers)
  499.     {
  500.         CheckPtrExistence(Window);
  501.         ERROR(Window != CurrentAboutBox,PRERR(ForceAbort,
  502.             "AboutBoxWindowDoIdle:  window pointer inconsistency"));
  503.         TextEditUpdateCursor(Window->Information);
  504.         if (CheckCursorFlag)
  505.             {
  506.                 if (TextEditIBeamTest(Window->Information,XLoc,YLoc))
  507.                     {
  508.                         SetIBeamCursor();
  509.                     }
  510.                  else
  511.                     {
  512.                         SetArrowCursor();
  513.                     }
  514.             }
  515.     }
  516.  
  517.  
  518. static void        AboutBoxWindowBecomeActive(AboutBoxWindowRec* Window)
  519.     {
  520.         CheckPtrExistence(Window);
  521.         ERROR(Window != CurrentAboutBox,PRERR(ForceAbort,
  522.             "AboutBoxWindowBecomeActive:  window pointer inconsistency"));
  523.         EnableTextEditSelection(Window->Information);
  524.     }
  525.  
  526.  
  527. static void        AboutBoxWindowBecomeInactive(AboutBoxWindowRec* Window)
  528.     {
  529.         CheckPtrExistence(Window);
  530.         ERROR(Window != CurrentAboutBox,PRERR(ForceAbort,
  531.             "AboutBoxWindowBecomeInactive:  window pointer inconsistency"));
  532.         DisableTextEditSelection(Window->Information);
  533.     }
  534.  
  535.  
  536. static void        AboutBoxWindowJustResized(AboutBoxWindowRec* Window)
  537.     {
  538.         EXECUTE(PRERR(ForceAbort,"AboutBoxWindowJustResized:  about box can't resize"));
  539.     }
  540.  
  541.  
  542. static void        AboutBoxWindowDoMouseDown(OrdType XLoc, OrdType YLoc,
  543.                                 ModifierFlags Modifiers, AboutBoxWindowRec* Window)
  544.     {
  545.         CheckPtrExistence(Window);
  546.         ERROR(Window != CurrentAboutBox,PRERR(ForceAbort,
  547.             "AboutBoxWindowDoMouseDown:  window pointer inconsistency"));
  548.         if (TextEditHitTest(Window->Information,XLoc,YLoc))
  549.             {
  550.                 TextEditDoMouseDown(Window->Information,XLoc,YLoc,Modifiers);
  551.             }
  552.     }
  553.  
  554.  
  555. static void        AboutBoxWindowDoKeyDown(unsigned char KeyCode,
  556.                                 ModifierFlags Modifiers, AboutBoxWindowRec* Window)
  557.     {
  558.         CheckPtrExistence(Window);
  559.         ERROR(Window != CurrentAboutBox,PRERR(ForceAbort,
  560.             "AboutBoxWindowDoKeyDown:  window pointer inconsistency"));
  561.         if ((KeyCode == eLeftArrow) || (KeyCode == eRightArrow)
  562.             || (KeyCode == eUpArrow) || (KeyCode == eDownArrow))
  563.             {
  564.                 TextEditDoKeyPressed(Window->Information,KeyCode,Modifiers);
  565.             }
  566.         else if (KeyCode == eCancelKey)
  567.             {
  568.                 AboutBoxWindowClose(Window);
  569.             }
  570.     }
  571.  
  572.  
  573. static void        AboutBoxWindowClose(AboutBoxWindowRec* Window)
  574.     {
  575.         CheckPtrExistence(Window);
  576.         ERROR(Window != CurrentAboutBox,PRERR(ForceAbort,
  577.             "AboutBoxWindowClose:  window pointer inconsistency"));
  578.         HideAnyAboutBoxes();
  579.     }
  580.  
  581.  
  582. static void        DrawImage(WinType* Window, OrdType X, OrdType Y, OrdType Width,
  583.                                 OrdType Height, unsigned char* RawData)
  584.     {
  585.         Bitmap*            TheBitmap;
  586.  
  587.         TheBitmap = MakeBitmap(RawData,Width,Height,((Width + 7) / 8));
  588.         if (TheBitmap != NIL)
  589.             {
  590.                 SetClipRect(Window,0,0,WIDTH,HEIGHT);
  591.                 DrawBitmap(Window,X,Y,TheBitmap);
  592.                 DisposeBitmap(TheBitmap);
  593.             }
  594.     }
  595.  
  596.  
  597. static void        AboutBoxWindowUpdator(AboutBoxWindowRec* Window)
  598.     {
  599.         CheckPtrExistence(Window);
  600.         ERROR(Window != CurrentAboutBox,PRERR(ForceAbort,
  601.             "AboutBoxWindowUpdator:  window pointer inconsistency"));
  602.         DrawImage(Window->ScreenID,IPX,IPY,IPWidth,IPHeight,IntegralProductionsdx);
  603.         DrawTextLine(Window->ScreenID,GetScreenFont(),9,"Presents",StrLen("Presents"),
  604.             (WIDTH - LengthOfText(GetScreenFont(),9,"Presents",StrLen("Presents"),ePlain)) / 2,
  605.             PresentsY,ePlain);
  606.         DrawImage(Window->ScreenID,StupidX,StupidY,StupidWidth,StupidHeight,NameOfProgram);
  607.         DrawImage(Window->ScreenID,IconX,IconY,IconWidth,IconHeight,Icon);
  608.         DrawTextLine(Window->ScreenID,GetScreenFont(),9,"Version "VersionString,
  609.             StrLen("Version "VersionString),5,HEIGHT - GetFontHeight(GetScreenFont(),9) - 3,
  610.             ePlain);
  611.         TextEditFullRedraw(Window->Information);
  612.     }
  613.  
  614.  
  615. static void        AboutBoxWindowMenuSetup(AboutBoxWindowRec* Window)
  616.     {
  617.         CheckPtrExistence(Window);
  618.         ERROR(Window != CurrentAboutBox,PRERR(ForceAbort,
  619.             "AboutBoxWindowMenuSetup:  window pointer inconsistency"));
  620.         if (TextEditIsThereValidSelection(Window->Information))
  621.             {
  622.                 EnableMenuItem(mCopy);
  623.                 ChangeItemName(mCopy,"Copy Text");
  624.             }
  625.         EnableMenuItem(mSelectAll);
  626.         ChangeItemName(mSelectAll,"Select All Text");
  627.         ChangeItemName(mCloseFile,"Close About Box");
  628.         EnableMenuItem(mCloseFile);
  629.     }
  630.  
  631.  
  632. static void        AboutBoxWindowDoMenuCommand(AboutBoxWindowRec* Window,
  633.                                 MenuItemType* MenuItem)
  634.     {
  635.         CheckPtrExistence(Window);
  636.         ERROR(Window != CurrentAboutBox,PRERR(ForceAbort,
  637.             "AboutBoxWindowDoMenuCommand:  window pointer inconsistency"));
  638.         if (MenuItem == mCopy)
  639.             {
  640.                 TextEditDoMenuCopy(Window->Information);
  641.             }
  642.         else if (MenuItem == mSelectAll)
  643.             {
  644.                 TextEditDoMenuSelectAll(Window->Information);
  645.             }
  646.         else if (MenuItem == mCloseFile)
  647.             {
  648.                 AboutBoxWindowClose(Window);
  649.             }
  650.         else
  651.             {
  652.                 EXECUTE(PRERR(ForceAbort,"AboutBoxWindowDoMenuCommand:  unknown command"));
  653.             }
  654.     }
  655.